﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Manager
{
    public partial class frmMain : Form
    {
        frmNV frmNV;
        frmPB frmPB;
        frmCT frmCT;

        public frmMain()
        {
            InitializeComponent();
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
          
            deleteAllChildForm();
            frmNV = new frmNV();
            frmNV.MdiParent = this;
            frmNV.Show();
        }

        public void deleteAllChildForm() 
        {
            foreach(Form child in this.MdiChildren)
            {
                child.Close();
            }
        }

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
      
            deleteAllChildForm();
            frmPB = new frmPB();
            frmPB.MdiParent = this;
            frmPB.Show();
        }

        private void toolStripButton3_Click(object sender, EventArgs e)
        {
           
            deleteAllChildForm();
            frmCT = new frmCT();
            frmCT.MdiParent = this;
            frmCT.Show();
        }
        private void salaryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmReport frm = new frmReport();
            frm.Show();
        }

        private void côngTrìnhToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SalaryReport sr = new SalaryReport();
            sr.ShowDialog();
        }

        private void guideToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }
    }
}
